using System;
using DeclarativeTest.Core.Support;

namespace DeclarativeTest.Core.Attributes
{
	/// <summary>
	/// This attribute is used for automatic action registration with <see cref="DefaultActionFactory"/>.
	/// </summary>
	[AttributeUsage(AttributeTargets.Class)]
	public class ActionAttribute : Attribute
	{
		#region .ctor

		/// <summary>
		/// Initializes a new instance of the <see cref="ActionAttribute"/> class.
		/// </summary>
		public ActionAttribute( string @namespace ):this( @namespace, null )
		{
		}

		/// <summary>
		/// Initializes a new instance of the <see cref="ActionAttribute"/> class.
		/// </summary>
		public ActionAttribute( string @namespace, string name )
		{
			Assume.ArgumentIsNotNull( @namespace, "namespace" );
			Namespace = @namespace;
			Name = name;
		}

		#endregion

		#region Public properties

		/// <summary>
		/// Action namespace.
		/// </summary>
		public string Namespace { get; set; }

		/// <summary>
		/// Action name.
		/// </summary>
		public string Name { get; set; }

		/// <summary>
		/// Action description.
		/// </summary>
		public string Description { get; set; }

		#endregion
	}
}